package v1

const GPDTREDISQUEUE string = "gpdt_queque"
const GPDTREDISQUEUEQUICK string = "gpdt_queque_quick"

type Result struct {
	Target
	Service `json:"service"`

	Timestamp int32  `json:"timestamp"`
	Error     string `json:"error"`
	Found     bool   `json:"found"`
}

type Service struct {
	Target
	Mac         string `json:"mac"`
	Name        string `json:"name"`
	Protocol    string `json:"protocol"`
	Banner      string `json:"banner"`
	BannerBytes []byte `json:"banner_bytes"`

	Extras  `json:"extras"`
	Details `json:"details"`
}

type Extras struct {
	VendorProduct   string `json:"vendor_product,omitempty"`
	Version         string `json:"version,omitempty"`
	Info            string `json:"info,omitempty"`
	Hostname        string `json:"hostname,omitempty"`
	OperatingSystem string `json:"operating_system,omitempty"`
	DeviceType      string `json:"device_type,omitempty"`
	CPE             string `json:"cpe,omitempty"`
}

type Details struct {
	ProbeName     string `json:"probe_name"`
	ProbeData     string `json:"probe_data"`
	MatchMatched  string `json:"match_matched"`
	IsSoftMatched bool   `json:"soft_matched"`
}

type Target struct {
	IP       string `json:"ip"`
	Port     int    `json:"port"`
	Protocol string `json:"protocol"`
}
